<?php


namespace app\api\validate;


use think\Validate;

class CourseValidate extends Validate{
    protected $rule = [
        'exp_id'      => 'require|number',
        'start_time'  => 'require|dateFormat:Y-m-d',
        'end_time'    => 'require|dateFormat:Y-m-d',
        'content'     => 'require|max:500',
    ];

    /*protected $message = [
        'name.require' => 'wewe',
        'name.in' => 'wewe',2
    ];*/

    protected $field = [
        'exp_id'      => '阅历id',
        'start_time'  => '阅历开始时间',
        'end_time'    => '阅历结束时间',
        'content'     => '内容',
    ];

    protected $scene = [
        'add'   => ['start_time','end_time','content'],
        'edit'  => ['exp_id','start_time','end_time','content'],
    ];
}